import Vue from 'vue'
import Vuex, {
  createLogger
} from 'vuex'
import resources from './modules/resources'
import keepAlive from './modules/keepAlive'
import cartShop from './modules/cartShop'

Vue.use(Vuex)

const debug = process.env.NODE_ENV !== 'production'

export default new Vuex.Store({
  modules: {
    resources,
    keepAlive,
    cartShop
  },
  // strict: debug
  strict: false,
  plugins: debug ? [createLogger()] : []
})
